//
//  LoginViewController.h
//  ActiveDeck
//
//  Created by Chiao-Wei Liu on 2011/4/4.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GDataXMLNode.h"
#import "NewUserViewController.h"
#import "AD_Environment.h"

@interface LoginViewController : UIViewController <UITextFieldDelegate>{
    
    IBOutlet UITextField *Txt_Email;
    IBOutlet UITextField *Txt_Pass;
    GDataXMLElement *AuthNode;
    NSString *loginXML;
    NSString *cont_UserName;
    BOOL loginSuccess;
    
    NewUserViewController *NewUserVC;
    
    AD_Environment *environment;
    
    id _delegate;
}

@property (nonatomic, retain) NSString *cont_UserName;
@property (nonatomic, retain) NewUserViewController *NewUserVC;
@property (readwrite) BOOL loginSuccess;
@property (nonatomic, retain) IBOutlet UITextField *Txt_Email;
@property (nonatomic, retain) IBOutlet UITextField *Txt_Pass;
@property (nonatomic, retain) GDataXMLElement *AuthNode;
@property (nonatomic, retain) NSString *loginXML;
@property (nonatomic, retain) AD_Environment *environment;

-(IBAction)cancelPress;
-(IBAction)loginPress;
-(IBAction)createNewUser;

-(void) BuildXMLAuth;
-(void) setDelegate:(id)delegate;
@end

@interface NSObject(HomeViewDelegate)
    -(void)setTheEnvironment:(AD_Environment *)theEnvironment;
@end